package gestionSimpleATester;

import static org.junit.Assert.*;

import java.util.Random;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class OperationTest {
	Operation op;
	Operation op2;
	@Before
	public void setUp() throws Exception {
		op = new WithdrawOperation(0);
		op2= new DepositOperation(0);
	}
	@After
	public void tearDown() throws Exception {
		op = null;
		op2 = null;
	}

	@Test
	public void testGetAmount() {
		/***After the constructor initialization ***/
		assertEquals(op.getAmount(),0 );
		assertEquals(op2.getAmount(), 0);
	}

	@Test
	public void testSetAmount() {
		float amoutValue = (new Random().nextFloat() * 100 );
		op.setAmount(amoutValue);
		assertEquals(op.getAmount(), amoutValue);
	}

	@Test
	public void testOperation() {
		//fail("Not yet implemented");		
	}


}
